﻿using System.ComponentModel.DataAnnotations;
using Volo.Abp.Application.Dtos;

namespace $ext_safeprojectname$.usermodels
{

    /// <summary>
    /// 
    /// </summary>
    public class PartInfoAddDto
    {

        /// <summary>
        /// 名称
        /// </summary>
        [MaxLength(16)]
        [Required(ErrorMessage ="部门岗位名称不为空，请重新输入！")]
        public string Name { get; set; }

        /// <summary>
        /// 短名称
        /// </summary>
        [MaxLength(8)]
        public string ShortName { get; set; }

        /// <summary>
        /// 描述
        /// </summary>
        [MaxLength(32)]
        public string Desc { get; set; }

        /// <summary>
        /// 父级ID
        /// </summary>
        public int FatherId { get; set; }

        /// <summary>
        /// 转发中显示此按钮
        /// </summary>
        public bool ShowButton { get; set; } = true;
    }

    /// <summary>
    /// 
    /// </summary>
    public class PartInfoDto : EntityDto<int>
    {

        /// <summary>
        /// 名称
        /// </summary>
        [MaxLength(16)]
        public string Name { get; set; }

        /// <summary>
        /// 短名称
        /// </summary>
        [MaxLength(8)]
        public string ShortName { get; set; }

        /// <summary>
        /// 描述
        /// </summary>
        [MaxLength(32)]
        public string Desc { get; set; }

        /// <summary>
        /// 父级ID
        /// </summary>
        public int FatherId { get; set; }

        /// <summary>
        /// 转发中显示此按钮
        /// </summary>
        public bool ShowButton { get; set; } = true;
    }

    /// <summary>
    /// 
    /// </summary>
    public class PartInfoUpdateDto : EntityDto<int>
    {

        /// <summary>
        /// 名称
        /// </summary>
        [MaxLength(16)]
        public string Name { get; set; }

        /// <summary>
        /// 短名称
        /// </summary>
        [MaxLength(8)]
        public string ShortName { get; set; }

        /// <summary>
        /// 描述
        /// </summary>
        [MaxLength(32)]
        public string Desc { get; set; }

        /// <summary>
        /// 父级ID
        /// </summary>
        public int FatherId { get; set; }

        /// <summary>
        /// 转发中显示此按钮
        /// </summary>
        public bool ShowButton { get; set; } = true;
    }

    /// <summary>
    /// 
    /// </summary>
    public class PartInfoListDto : EntityDto<int>
    {
        /// <summary>
        /// 名称
        /// </summary>
        [MaxLength(16)]
        public string Name { get; set; }

        /// <summary>
        /// 短名称
        /// </summary>
        [MaxLength(8)]
        public string ShortName { get; set; }

        /// <summary>
        /// 描述
        /// </summary>
        [MaxLength(32)]
        public string Desc { get; set; }

        /// <summary>
        /// 父级ID
        /// </summary>
        public int FatherId { get; set; }

        /// <summary>
        /// 转发中显示此按钮
        /// </summary>
        public bool ShowButton { get; set; } = true;

        /// <summary>
        /// 层级链 x,x,x,x, 包含自己
        /// </summary>
        public string FatherStr { get; set; }

        /// <summary>
        /// 层级深度，用于样式
        /// </summary>
        public int Level { get; set; } = 0;

        /// <summary>
        /// 扩展 绑定的用户
        /// </summary>
        public int UserId { get; set; }
    }
}
